package com.canbot.u05.activity.free

/**
 * Created by zmp on 2019/6/5 16:54
 * @author zmp
 */
data class FreeSetInfo(
        var jopPosition: String? = null,
        var voiceInfo: MediaInfo? = null,
        var autoForWard: Boolean = true,
        var freeMediaPlay: Boolean = true,
        var patrolOpen: Boolean = false,
        var freeMediaInfo: MediaInfo? = null,
        var freeMediaHz: FreeTimeInfo? = null,
        var patrolInterval: FreeTimeInfo? = null,
        var patrolSustain: FreeTimeInfo? = null,
        var points: List<String>? = null
) {
    fun intervalTimeNum(): Long {
        return patrolInterval?.timeNum ?: -1
    }

    fun sustainTimeNum(): Long {
        return patrolSustain?.timeNum ?: 5 * 60
    }

    fun freeMediaHzNum(): Long {
        return freeMediaHz?.timeNum ?: 60 * 1000
    }
}

data class FreeTimeInfo(
        var timeName: String? = null,
        var timeNum: Long? = null
)

data class MediaInfo(
        var mediaType: Int = -1,
        var simpleName: String? = null,
        var mediaContentOrPath: String? = null
) {
    companion object {

        const val AUDIO_TYPE_TTS = 1

        const val AUDIO_TYPE_AUDIO = 2

        const val AUDIO_TYPE_RECODE = 3

        const val AUDIO_TYPE_VIDEO = 4
    }
}